package com.controller;

import com.entity.MyDataSourceEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ControllerDemo01 {
    private MyDataSourceEntity myDataSourceEntity;

    @Autowired
    public void setMyDataSourceEntity(MyDataSourceEntity myDataSourceEntity) {
        this.myDataSourceEntity = myDataSourceEntity;
    }

    @RequestMapping("/index")
    public String test(){
        System.out.println(myDataSourceEntity.toString());
        return "欢迎来到对抗路";
    }
}
